#!/usr/bin/python
import sys, os 
import pygst 
pygst.require("0.10") 
import gst 
import gobject

PIPELINE="""filesrc location=%s ! decodebin ! audioconvert ! volume volume=0.6 ! tee name=tee1  
tee1.src0 
! queue ! audioconvert ! 
halaudiosink udi=/org/freedesktop/Hal/devices/usb_device_41e_3015_noserial_if0_alsa_playback_0  
tee1.src1 
! queue ! audioconvert ! alsasink device=hw:0 
tee1.src2 ! queue ! audioconvert ! 
halaudiosink udi=/org/freedesktop/Hal/devices/usb_device_77d_7af_noserial_if0_alsa_playback_0
"""


# Create the pipeline 
pipeline = gst.parse_launch(PIPELINE % (sys.argv[1]))

pipeline.set_state(gst.STATE_PLAYING)

gobject.MainLoop().run()
